home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-21 | 4.4 KB | 134 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWSUStrm.cpp
- // Release Version: $ 1.0d1 $
- //
- // Creation Date: 4/12/94
- //
- // Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWSUSTRM_H
- #include "FWSUStrm.h"
- #endif
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- //========================================================================================
- // •• CLASS FW_CStorageUnitSink
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // • FW_CStorageUnitSink::FW_CStorageUnitSink
- //----------------------------------------------------------------------------------------
-
- FW_CStorageUnitSink::FW_CStorageUnitSink(XMPStorageUnit* storageUnit) :
- fStorageUnit(storageUnit)
- {
- }
-
- //----------------------------------------------------------------------------------------
- // • FW_CStorageUnitSink::~FW_CStorageUnitSink
- //----------------------------------------------------------------------------------------
-
- FW_CStorageUnitSink::~FW_CStorageUnitSink()
- {
- }
-
- //----------------------------------------------------------------------------------------
- // • FW_CStorageUnitSink::Read
- //----------------------------------------------------------------------------------------
-
- void FW_CStorageUnitSink::Read(void * destination, long count)
- {
- fStorageUnit->GetValue(count, (XMPValue)destination);
- }
-
- //----------------------------------------------------------------------------------------
- // • FW_CStorageUnitSink::ReadPeekAdvance
- //----------------------------------------------------------------------------------------
-
- void FW_CStorageUnitSink::ReadPeekAdvance(long bytesRead)
- {
- fStorageUnit->SetOffset(fStorageUnit->GetOffset() + bytesRead);
- }
-
- //----------------------------------------------------------------------------------------
- // • FW_CStorageUnitSink::GetWritableBytes
- //----------------------------------------------------------------------------------------
-
- long FW_CStorageUnitSink::GetWritableBytes() const
- {
- return 0x7FFFFFF;
- }
-
- //----------------------------------------------------------------------------------------
- // • FW_CStorageUnitSink::Write
- //----------------------------------------------------------------------------------------
-
- void FW_CStorageUnitSink::Write(const void* source, long count)
- {
- fStorageUnit->SetValue(count, (XMPValue)source);
- }
-
- //----------------------------------------------------------------------------------------
- // • FW_CStorageUnitSink::WritePeekAdvance
- //----------------------------------------------------------------------------------------
-
- void FW_CStorageUnitSink::WritePeekAdvance(long bytesWritten)
- {
- fStorageUnit->SetOffset(fStorageUnit->GetOffset() + bytesWritten);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStorageUnitSink::GetLength
- //----------------------------------------------------------------------------------------
-
- long FW_CStorageUnitSink::GetLength() const
- {
- return fStorageUnit->GetSize();
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStorageUnitSink::GetPosition
- //----------------------------------------------------------------------------------------
-
- long FW_CStorageUnitSink::GetPosition() const
- {
- return fStorageUnit->GetOffset();
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStorageUnitSink::SetPosition
- //----------------------------------------------------------------------------------------
-
- void FW_CStorageUnitSink::SetPosition(long position)
- {
- fStorageUnit->SetOffset(position);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStorageUnitSink::ReadPeek
- //----------------------------------------------------------------------------------------
-
- const void* FW_CStorageUnitSink::ReadPeek(long& availableReadBytes)
- {
- FW_UNUSED(availableReadBytes);
-
- return NULL;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStorageUnitSink::WritePeek
- //----------------------------------------------------------------------------------------
-
- void* FW_CStorageUnitSink::WritePeek(long& availableWriteBytes)
- {
- FW_UNUSED(availableWriteBytes);
-
- return NULL;
- }
-